﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PdfLibrary
{
    public class PdfCommand : IPdfObject
    {
        public string Name;

        public bool LoadFromReader(PdfReader reader, bool throwException)
        {
            this.Name = reader.ReadWord();

            if (!this.Name.All(c => 'A' <= c && c <= 'Z' || 'a' <= c && c <= 'z' || c == '*' || c == '"' || c == '\''))
                return false;

            return this.Name != null;
        }
    }
}
